import config from "@/config"
import http from "@/utils/request"

export default {
    list: {
        url: `${config.API_URL}/admin/unit/index`,
        name: "获取单位列表",
        get: async function (data = {}) {
            return await http.get(this.url, data);
        }
    },
    add: {
        url: `${config.API_URL}/admin/unit/add`,
        name: "添加单位",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    },
    edit: {
        url: `${config.API_URL}/admin/unit/edit`,
        name: "编辑单位",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    },
    del: {
        url: `${config.API_URL}/admin/unit/del`,
        name: "删除单位",
        get: async function (data = {}) {
            return await http.get(this.url, data);
        }
    }
}
